const db = wx.cloud.database();
const app = getApp();
Page({
  data: {},
 
  formSubmit: function(res) {
    console.log(res);
    const {userName, userNumber} = res.detail.value;
    if (userNumber == '' || userName == '') {
      wx.showModal({
        title: '错误',
        content: '请将所有信息填写完整！',
      })
      return
    }
    if (userName === 'admin' && userNumber === "123456") {
        wx.reLaunch({
          url: '../teacher/teacher',
        })
      } else {
        wx.showToast({
          title: '密码或账号错误',
          icon: 'none'
        })
      }
    
  }
})